<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../fonts/font/712_serif.css">
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .lee{
            font-size: 40px;
            text-align: center;
            display: inline-block;
        }
        .lee>div{
            width: 50px;
            height: 70px;
            font-family: '我的字体';
            position: relative;
            line-height: 50px;
            box-shadow: 0px 0px 10px 10px rgba(0,0,255,.3);
            writing-mode: vertical-rl;
            text-orientation: upright;
            letter-spacing:45px;
            text-indent: 10px;
            display: inline-block;
            overflow: hidden;
        }
        .lee>div>div{
            position: absolute;
            width: 100%;
            top: 0px;
            left: 0px;
        }
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body>
    <div id="box" v-cloak="">
        <div style="margin-top: 30px;text-align: center;">
            <lee v-for="i in num.toString()" :sum="i"></lee>
            {{num}}
        </div>
    </div>
    <template id="lee">
        <div class="lee">
            <div>
                <div :style="{transition:'all .8s ease',top:num*-73+'px'}">
                        0123456789
                </div>
            </div>
        </div>
    </template>
</body>
<script src="../js/vue.js"></script>
<script>
    Vue.component('lee',{
        template:'#lee',
        props:['sum'],
        data(){
            return{
                num:0
            }
        },
        mounted(){
            this.$nextTick(()=>{
                setTimeout(()=>{
                    this.num = Number(this.sum)
                },200)
            })
        }
    })
    new Vue({
        el:'#box',
        data:{
            num:34243546457576
        }
    })
</script>
</html>